<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:sec="gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.security" elementFormDefault="qualified" targetNamespace="gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.security" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="ServiceSecurityMetadata" type="sec:ServiceSecurityMetadata" />
  <xs:complexType name="ServiceSecurityMetadata">
    <xs:sequence>
      <xs:element name="defaultCommunicationMechanism" type="sec:CommunicationMechanism" />
      <xs:element name="operations">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="sec:Operation" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CommunicationMechanism" type="sec:CommunicationMechanism" />
  <xs:complexType name="CommunicationMechanism">
    <xs:all>
      <xs:element minOccurs="0" ref="sec:GSITransport" />
      <xs:element minOccurs="0" ref="sec:GSISecureMessage" />
      <xs:element minOccurs="0" ref="sec:GSISecureConversation" />
      <xs:element minOccurs="0" ref="sec:None" />
    </xs:all>
    <xs:attribute name="anonymousPermitted" type="xs:boolean" use="required" />
  </xs:complexType>
  <xs:element name="Operation" type="sec:Operation" />
  <xs:complexType name="Operation">
    <xs:sequence>
      <xs:element ref="sec:CommunicationMechanism" />
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required" />
  </xs:complexType>
  <xs:element name="CommunicationStyle" type="sec:CommunicationStyle" />
  <xs:complexType name="CommunicationStyle">
    <xs:sequence />
    <xs:attribute name="protectionLevel" type="sec:protectionLevelType" use="required">
      <xs:annotation>
        <xs:documentation>Describes data protection level (integrity, privacy, either,
				none)</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:element name="GSISecureMessage" type="sec:GSISecureMessage" />
  <xs:complexType name="GSISecureMessage">
    <xs:complexContent mixed="false">
      <xs:extension base="sec:CommunicationStyle">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="GSISecureConversation" type="sec:GSISecureConversation" />
  <xs:complexType name="GSISecureConversation">
    <xs:complexContent mixed="false">
      <xs:extension base="sec:CommunicationStyle">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="protectionLevelType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="integrity" />
      <xs:enumeration value="privacy" />
      <xs:enumeration value="either" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="GSITransport" type="sec:GSITransport" />
  <xs:complexType name="GSITransport">
    <xs:complexContent mixed="false">
      <xs:extension base="sec:CommunicationStyle">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="None" type="sec:None" />
  <xs:complexType name="None">
    <xs:sequence />
  </xs:complexType>
</xs:schema>